﻿ 
$(document).ready(function () {
    var moveLeft = 10;
    var moveDown = 10;

    var height = $(document).height(); // returns height of HTML document
    var scroll = (height / 100) * 10;
    // hide #back-top first
    $("#back-top").hide();

    // fade in #back-top
    $(function () {
        $(window).scroll(function () {
            if ($(this).scrollTop() > scroll) {
                $('#back-top').fadeIn();
                $('#back-top').css("right", "30px");
            } else {
                $('#back-top').fadeOut();
            }
        });

        // scroll body to 0px on click
        $('#back-top a').click(function () {
            $('body,html').animate({
                scrollTop: 0
            }, 800);
            return false;
        });

       

    });

    $("div.pop-upx").zIndex(10000);
    $('span.trigger').hover(function (e) {
        $('div.pop-upx').show();
        $('div.action_bar_popup_arrow').show();
    }, function () {
        $('div.pop-upx').hide();
        $('div.action_bar_popup_arrow').hide();

    });

    $('span.trigger').mousemove(function (e) {
        $("div.pop-upx").css('top', e.pageY - moveDown).css('left', e.pageX - moveLeft);
    });
});


















